<?php 

?>
<?php if (!$this->isSuccess): ?>
	<div style="width: 400px; height: 300px; padding: 20px;">
		<?php echo $this->form->setAttrib('id', 'admin_exam_category_edit')->setAttrib('class', 'global_form_popup'); ?>
		<script type="text/javascript">	
		treeObj = {
				id: "parent_id",
				treeAJAX: {
					link: "<?php echo Zend_Controller_Front::getInstance()->getRouter()->assemble(array(								
								'controller' => 'index', 
								'action' => 'xmlcategories',
								'root'	=>	1,
								'selected'	=>	$this->parentId,
								'excluded'	=>	$this->category_id
							), 'exam_general', true);?>"
				},
				canResizeWidth: true,
				canResizeHeight: true,
				canStick: true,
				skinName: "LightBlue"
			};
		TreeBox.init();
		TreeBox.build(treeObj);
		</script>
	</div>
<?php else: ?>
	<script type="text/javascript">		
		parent.changeTreeSelected('<?php echo $this->category_id ?>');
		setTimeout(function()
			{
			        parent.Smoothbox.close();				      
			}, 1000);
	</script>
	<div class="global_form_popup_message" style="padding: 5px;">
		<?php echo $this->translate('This category was edited.'); ?>
    </div>
<?php endif; ?>